<?php require_once(dirname(__FILE__).'/inc/config.inc.php');IsModelPriv('diymodel_update'); ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>编辑自定义模型</title>
<link href="templates/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="templates/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/jquery.nicescroll.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/layindex.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/common.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/Validform_v5.3.2_min.js"></script>
<script type="text/javascript">
    $(function () {
        //初始化表单验证
        $("#form").initValidform();
    });
</script>
</head>
<?php
$row = $dosql->GetOne("SELECT * FROM `#@__diymodel` WHERE id=$id");
?>
<body class="mainbody">
<form method="post" id="form" method="post" action="diymodel_save.php" >
<!--导航栏-->
<div class="location">
  <a href="diymodel.php" class="back"><i></i><span>返回列表页</span></a>
  <a href="home.php" class="home"><i></i><span>首页</span></a>
  <i class="arrow"></i>
  <a href="diymodel.php"><span>自定义模型</span></a>
  <i class="arrow"></i>
  <span>编辑自定义模型</span>
   <a href="javascript:location.reload();" class="reload">刷新</a>
</div>
<div class="line10"></div>
<!--/导航栏-->

<!--内容-->
<div id="floatHead" class="content-tab-wrap">
  <div class="content-tab">
    <div class="content-tab-ul-wrap">
      <ul>
        <li><a class="selected" href="javascript:;">编辑自定义模型</a></li>
      </ul>
    </div>
  </div>
</div>

<div class="tab-content">

 
  <dl>
    <dt>模型标识：</dt>
    <dd><input  type="text" value="<?php echo $row['modelname']; ?>" readonly="readonly"  class="input normal"  sucmsg=" " /> <span class="Validform_checktip">*模型标识与表名一旦设置不允许更改</span></dd>
  </dl> 
  <dl>
    <dt>模型表名：</dt>
	<dd><input  type="text" value="<?php echo $row['modeltbname']; ?>" readonly="readonly"  class="input normal"  sucmsg=" " /> </dd>
  </dl>
  <dl>
    <dt>模型名称：</dt>
	<dd><input type="text" name="modeltitle" id="modeltitle" class="input normal" value="<?php echo $row['modeltitle']; ?>" /> <span class="Validform_checktip">*用于模型名称的显示</span></dd>
  </dl>
   <dl>
    <dt>模型URL：</dt>
    <dd><input type="text" name="modelurl" id="modelurl" value="<?php echo $row['modelurl']; ?>" class="input" /><span class="Validform_checktip">*不建议更改，否则，需要后台手动添加该文件,并编写数据处理文件。</span></dd>
  </dl> 
  <dl>
    <dt>预设字段：</dt><?php
			if(is_array(explode(',', $row['defaultfield'])))
				$defaultfield = explode(',', $row['defaultfield']);
			else
				$defaultfield = array();
			?>
  <dd><div class="rule-multi-porp">
          <span id="cblActionType">
		  <input id="defaultfield[]0" type="checkbox" name="defaultfield[]" value="title" <?php if(in_array('title', $defaultfield)) echo 'checked="checked"'; ?>  /><label for="defaultfield[]0">标　题(title)</label>
		  <input id="defaultfield[]1" type="checkbox" name="defaultfield[]" value="flag" <?php if(in_array('flag', $defaultfield)) echo 'checked="checked"'; ?> /><label for="defaultfield[]1">属　性(flag)</label>
		  <input id="defaultfield[]2" type="checkbox" name="defaultfield[]" value="picurl" <?php if(in_array('picurl', $defaultfield)) echo 'checked="checked"'; ?> /><label for="defaultfield[]2">缩略图片(picurl)</label>
		  <input id="defaultfield[]3" type="checkbox" name="defaultfield[]" value="orderid"<?php if(in_array('orderid', $defaultfield)) echo 'checked="checked"'; ?>  /><label for="defaultfield[]3">排列排序(orderid)</label>
		  <input id="defaultfield[]4" type="checkbox" name="defaultfield[]" value="posttime"<?php if(in_array('posttime', $defaultfield)) echo 'checked="checked"'; ?>  /><label for="defaultfield[]4">更新时间(posttime)</label>
		  </span>
      </div></dd>
  </dl> 
  <dl>
    <dt>排列排序：</dt>
    <dd>
		<input type="text" name="orderid" id="orderid" class="input small" value="<?php echo $row['orderid']; ?>" /><span class="Validform_checktip">*数字越小越靠前</span>
    </dd>
  </dl>
   <dl>
    <dt>审　核：</dt>
    <dd>  <div class="rule-single-checkbox"><input type="checkbox" name="checkinfo" value="true" <?php if($row['checkinfo'] == 'true') echo 'checked="checked"'; ?> /></div></dd>
  </dl>

</div>
<!--/内容-->

<!--工具栏-->
<div class="page-footer">
  <div class="btn-wrap">
    <input type="submit" name="btnSubmit" value="提交保存" class="btn" />
    <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript:history.back(-1);" />
	<input type="hidden" name="action" id="action" value="update" />
	<input type="hidden" name="id" id="id" value="<?php echo $id; ?>" />
  </div>
</div>
<!--/工具栏-->
</form>
</body>
</html>
